package app.mvp;

import android.content.Context;
import android.widget.Toast;

import app.mvp.base.mvp.BaseMvpPresenter;

/**
 * Created by 刘智强 on 2017/4/7.
 */

public class MainPresenterLogin extends BaseMvpPresenter<MainView> {
    private MainModel mainModel;


    public MainPresenterLogin(MainModel mainModel) {
        this.mainModel = mainModel;

    }

    public void setData() {
        checkViewAttach();
        MainView mainView=getMvpView();
        mainView.setData(mainModel.setUser());
    }

    public  void toastUserName(){
        checkViewAttach();
        MainView mainView=getMvpView();
       mainView.toastUserName(mainModel.setUser());
    }

    @Override
    public void init() {

    }

    @Override
    public void getDataFromCache() {

    }

    @Override
    public void getDataFromNet() {

    }
}
